// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
function show(obj,h){
	if(obj.css('height')!='0px'){
		obj.animate({height:'0px'},'slow')
	} else {
		obj.animate({height:h},'slow')
	}
}
function goto(page,total){
	if(page>=1 && page<=total){
		$("#page").val(page)
		$("#submit").click()
	}
}

$('#search').click(function(){
	window.open('/item/keywords/'+$('#q').val(),'_blank');
})

$('#q').focus(function(){
	if($(this).val()=='请输入关键字'){
		$(this).val("")
	}
}).blur(function(){
	if($(this).val()==''){
		$(this).val('请输入关键字')
	}
})